import React, { Component } from 'react';
import { router } from 'umi';
import ProDetail from '@/pages/components/Problem/ProblemPage/ProDetail';

class Proble extends Component {
  onModifyData = data => {
    router.push(
      data.taskSource === 6
        ? `/customservicemanage/addemployee/addassupdate?addTaskId=${data.busiId}`
        : `/customservicemanage/addemployee/update?sendId=${data.sendId}&addTaskId=${data.busiId}`
    );
  };

  onViewDetails = data => {
    router.push(
      `/customservicemanage/addemployee/detail?addTaskId=${data.busiId}&taskSource=${
        data.taskSource
      }&sendId=${data.sendId}`
    );
  };

  render() {
    return <ProDetail onModifyData={this.onModifyData} onViewDetails={this.onViewDetails} />;
  }
}

export default Proble;
